Skip to main content

StringToJString

Type

handler

Summary

Convert a String into a java string

Syntax

StringToJString(<pString>)

Description

Use StringToJString to convert a variable of type String to an instance of the class java.lang.String.

Parameters

NameTypeDescription

pString

The String to convert

Examples

foreign handler CreateJavaCurrencyWithCode(in pString as JString) returns JObject binds to "java:java.util.Currency>getInstance(Ljava/lang/String;)Ljava/util/Currency;!static"

-- Create a new Currency object
variable tCurrency as JObject
unsafe
variable tCode as JString
put StringToJString("AMD") into tCode

put CreateJavaCurrencyWithCode(tCode) into tCurrency
end unsafe

Value

NameTypeDescription

return

A JObject of type java.lang.String

Thank you for your feedback!

Was this page helpful?